from pydantic import BaseModel, Field
from typing import Optional

class FoolProofTypeBase(BaseModel):
    foolProofTypeName: str = Field(..., description="防呆措施类型名称")
    description: Optional[str] = Field(None, description="描述")

class FoolProofTypeCreate(FoolProofTypeBase):
    foolProofTypeId: str = Field(..., description="防呆措施类型ID")

class FoolProofTypeUpdate(BaseModel):
    foolProofTypeName: Optional[str] = None
    description: Optional[str] = None

class FoolProofTypeDetail(FoolProofTypeBase):
    foolProofTypeId: str
    createdBy: Optional[str] = Field(None, description="创建人(后端自动生成)")
    createdAt: Optional[str] = Field(None, description="创建时间(后端自动生成)")
    updatedBy: Optional[str] = Field(None, description="更新人(后端自动生成)")
    updatedAt: Optional[str] = Field(None, description="更新时间(后端自动生成)") 